package com.ruoyi.system.domain.idclazz;

import jakarta.persistence.Id;
import lombok.Data;

import java.util.Objects;

@Data
public class SysUserPostId {
	/** 用户ID */
	@Id
	private Long userId;

	/** 岗位ID */
	@Id
	private Long postId;

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		SysUserPostId that = (SysUserPostId) o;
		return Objects.equals(userId, that.userId) && Objects.equals(postId, that.postId);
	}

	@Override
	public int hashCode() {
		return Objects.hash(userId, postId);
	}
}
